Xbasic

Array Functions

Description

Array methods and support functions.

Name
Description
*ARRAY_APPEND Function

The *ARRAY_APPEND() function re-dimensions an array and assigns a value to the new array element. It appends value to end of array and provide value if not assigning to it.

*array_append_property Function

Append subproperty value to end of property array - provide value if not assigning to it.

*array_ranged_assign Function

The *ARRAY_RANGE_ASSIGN() function copies a range of elements from one array to another. It performs a ranged array assignment, destinition to source, on array patterns passed in.

*ARRAY_RANGED_REFERENCE_TO_RANGE Function

The *ARRAY_RANGED_REFERENCE_TO_RANGE() function takes a list of array variable definitions and returns a new list that can be used to properly DIM them.

*string_to_array Function

Treat a character string variable as an character array, each line represents an array entry.

A5_ADO_TO_ARRAY Function

Takes an Access .mdb file, or an ADO Connection string and loads the data into an array. (For help on parameters, call with "ado.Help" set to "Yes".)

a5_array_from_string Function

Creates a character array from a cr-lf delimited string. Returns the size of the array.

a5_cp2_updatearrayalllibs Function

Updates all Arrays in the CP for all dirty libraries.

a5_createcolumnarray Function

Called by a5_html_grid() and a5_html_dialog() to create the tmpl_column_info[] array

a5_dbf_to_array Function

Takes a .dbf file, and loads the data into an array. (For help on parameters, call with "do.Help" set to "Yes".)

a5_getmovelogicfunctions Function

Text for functions to move entries in an array

a5_getmovelogicfunctions_ajax Function

Text for functions to move entries in an array

a5_getxbfmwktodo2 Function

Convert the a_work array to Xbasic update commands

a5_hyperlinkparameters Function

Takes a pointer array and creates parameters for a URL. pointer array has .alias and .filter properties.

a5_parray_from_string Function

Creates a property array from a CR-LF delimited string. Returns the size of the array.

a5_parse_set_tree Function

Returns a property array with information about the set.

a5_unique_array_entries Function

Takes a property array and tests whether the 'property_name' element is unique. Adds a 'unique' property to the array which contains Yes or No for each element.

a5w_rulessave Function

Save the rules array

a5wcb_convertmergecellstofreeform Function

Go through the fields array and convert anything in a [merge cells] area into the appropriate freeform. Remove the merge cells tags

a5wcb_createlayoutarray Function

Create the layout array, used by tab controls

argument_add_array_argument Function

Adds or updates and array argument to an SQL::Arguments object. The SQL::Arguments object can be populated with argument arrays (typically used when passing values to a SQL query that uses an IN clause).

ArrayType Function

The ArrayType() function determines the data type of an array. E.g. Property, C, N, D, etc. If argument is not an array, returns null

ISARRAY Function

The ISARRAY() function determines whether an object is an array, and returns .t. if it is an array

Iterating Through Arrays, Collections, and Lists

You will frequently find yourself working with groups of data elements outside of a table. Xbasic provides tools for working with data in three formats:

reverseArray Function

Reverses an array.

SORT_ARRAY Function

Sort the elements of an array.

split Function

Splits a character string into an array of substrings.

Using the A5_ADO_TO_ARRAY function

This script demonstrates how to use the A5_ADO_TO_ARRAY()function which populates an array with data from an Access database, or an ADO connection string. Refer to the Xbasic Reference manual for a full description of the parameters that can be passed to the A5_ADO_TO_ARRAY() function. The A5_ADO_TO_ARRAY() function is a wrapper function. Inside the function, direct calls are made to ADO to fetch the data.

See Also